//
//  ShoppingModel.m
//  EJLX
//
//  Created by adc on 15/11/18.
//  Copyright © 2015年 江苏一键联信息科技有限公司. All rights reserved.
//

#import "ShoppingModel.h"

@implementation ShoppingModel

+(ShoppingModel *)prasePublicNoticeWithDictionary:(NSDictionary *)dict{
    
    ShoppingModel *shop = [[ShoppingModel alloc] init];
    
    NSDictionary *data = dict[@"data"];
    shop.btn = [ShoppingBtn prasePublicNoticeWithDictionary:data];
    
    NSArray *lunbo = data[@"banner"];
    
    shop.lunBOImgArr = [NSMutableArray array];
    for (NSDictionary *lunBo in lunbo) {
        shop.lunBoImageUrl = [lunBo objectForKey:@"imgUrl"];
        [shop.lunBOImgArr addObject:shop.lunBoImageUrl];
    }
    
    NSArray *goodsArr = data[@"categories"];
    shop.goodsArray = [NSMutableArray array];
    for (NSDictionary *goodsSection in goodsArr) {
        ShoppingGoods *goods= [ShoppingGoods prasePublicNoticeWithDictionary:goodsSection];
        
        [shop.goodsArray addObject:goods];
       
    }
    
    return shop;
}
@end
